package com.onec.service.trade.service.impl;

import com.onec.service.trade.dao.KBinRepository;
import com.onec.service.trade.entity.KBinInfo;
import com.onec.service.trade.service.KBinInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 获取银行卡信息：
 *
 * @author onec
 */
@Service
public class KBinInfoServiceImpl implements KBinInfoService {


    @Autowired
    private KBinRepository kBinRepository;

    @Override
    public KBinInfo getKBinInfo(String cardNo) {
        return kBinRepository.findByCard(cardNo);
    }

    @Override
    public KBinInfo getAvailableKBinInfo(String cardNo) {

        KBinInfo kBinInfo = this.getKBinInfo(cardNo);
        return kBinInfo;
    }
}
